YES 0.927
H-Termination proof of /home/matraf/haskell/eval_FullyBlown_Fast/List.hs
H-Termination of the given Haskell-Program with start terms could successfully be proven:
↳ HASKELL
↳ LR
mainModule List
| ((intersect :: [Bool] -> [Bool] -> [Bool]) :: [Bool] -> [Bool] -> [Bool]) |
module List where
| import qualified Maybe import qualified Prelude
|
| intersect :: Eq a => [a] -> [a] -> [a]
intersect | | = | intersectBy (==) |
|
| intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
intersectBy | eq xs ys | = | concatMap (\vv2 ->
case | vv2 of |
| x | -> | if any (eq x) ys then x : [] else [] |
| _ | -> | [] |
) xs |
|
module Maybe where
| import qualified List import qualified Prelude
|
Lambda Reductions:
The following Lambda expression
\vv2→
case | vv2 of |
| x | → if any (eq x) ys then x : [] else [] |
| _ | → [] |
is transformed to
intersectBy0 | eq ys vv2 | =
case | vv2 of | | x | → if any (eq x) ys then x : [] else [] |
| _ | → [] |
|
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
mainModule List
| ((intersect :: [Bool] -> [Bool] -> [Bool]) :: [Bool] -> [Bool] -> [Bool]) |
module List where
| import qualified Maybe import qualified Prelude
|
| intersect :: Eq a => [a] -> [a] -> [a]
intersect | | = | intersectBy (==) |
|
| intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
intersectBy | eq xs ys | = | concatMap (intersectBy0 eq ys) xs |
|
|
intersectBy0 | eq ys vv2 | = |
case | vv2 of |
| x | -> | if any (eq x) ys then x : [] else [] |
| _ | -> | [] |
|
|
module Maybe where
| import qualified List import qualified Prelude
|
Case Reductions:
The following Case expression
case | vv2 of |
| x | → if any (eq x) ys then x : [] else [] |
| _ | → [] |
is transformed to
intersectBy00 | eq ys x | = if any (eq x) ys then x : [] else [] |
intersectBy00 | eq ys _ | = [] |
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
mainModule List
| ((intersect :: [Bool] -> [Bool] -> [Bool]) :: [Bool] -> [Bool] -> [Bool]) |
module List where
| import qualified Maybe import qualified Prelude
|
| intersect :: Eq a => [a] -> [a] -> [a]
intersect | | = | intersectBy (==) |
|
| intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
intersectBy | eq xs ys | = | concatMap (intersectBy0 eq ys) xs |
|
|
intersectBy0 | eq ys vv2 | = | intersectBy00 eq ys vv2 |
|
|
intersectBy00 | eq ys x | = | if any (eq x) ys then x : [] else [] |
intersectBy00 | eq ys _ | = | [] |
|
module Maybe where
| import qualified List import qualified Prelude
|
If Reductions:
The following If expression
if any (eq x) ys then x : [] else []
is transformed to
intersectBy000 | x True | = x : [] |
intersectBy000 | x False | = [] |
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
mainModule List
| ((intersect :: [Bool] -> [Bool] -> [Bool]) :: [Bool] -> [Bool] -> [Bool]) |
module List where
| import qualified Maybe import qualified Prelude
|
| intersect :: Eq a => [a] -> [a] -> [a]
intersect | | = | intersectBy (==) |
|
| intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
intersectBy | eq xs ys | = | concatMap (intersectBy0 eq ys) xs |
|
|
intersectBy0 | eq ys vv2 | = | intersectBy00 eq ys vv2 |
|
|
intersectBy00 | eq ys x | = | intersectBy000 x (any (eq x) ys) |
intersectBy00 | eq ys _ | = | [] |
|
|
intersectBy000 | x True | = | x : [] |
intersectBy000 | x False | = | [] |
|
module Maybe where
| import qualified List import qualified Prelude
|
Replaced joker patterns by fresh variables and removed binding patterns.
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
mainModule List
| ((intersect :: [Bool] -> [Bool] -> [Bool]) :: [Bool] -> [Bool] -> [Bool]) |
module List where
| import qualified Maybe import qualified Prelude
|
| intersect :: Eq a => [a] -> [a] -> [a]
intersect | | = | intersectBy (==) |
|
| intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
intersectBy | eq xs ys | = | concatMap (intersectBy0 eq ys) xs |
|
|
intersectBy0 | eq ys vv2 | = | intersectBy00 eq ys vv2 |
|
|
intersectBy00 | eq ys x | = | intersectBy000 x (any (eq x) ys) |
intersectBy00 | eq ys vw | = | [] |
|
|
intersectBy000 | x True | = | x : [] |
intersectBy000 | x False | = | [] |
|
module Maybe where
| import qualified List import qualified Prelude
|
Cond Reductions:
The following Function with conditions
is transformed to
undefined0 | True | = undefined |
undefined1 | | = undefined0 False |
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
mainModule List
| (intersect :: [Bool] -> [Bool] -> [Bool]) |
module List where
| import qualified Maybe import qualified Prelude
|
| intersect :: Eq a => [a] -> [a] -> [a]
intersect | | = | intersectBy (==) |
|
| intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
intersectBy | eq xs ys | = | concatMap (intersectBy0 eq ys) xs |
|
|
intersectBy0 | eq ys vv2 | = | intersectBy00 eq ys vv2 |
|
|
intersectBy00 | eq ys x | = | intersectBy000 x (any (eq x) ys) |
intersectBy00 | eq ys vw | = | [] |
|
|
intersectBy000 | x True | = | x : [] |
intersectBy000 | x False | = | [] |
|
module Maybe where
| import qualified List import qualified Prelude
|
Haskell To QDPs
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ DependencyGraphProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_psPs(False, :(True, vz41), vz5) → new_psPs(False, vz41, vz5)
new_psPs(True, :(False, vz41), vz5) → new_psPs(True, vz41, vz5)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 2 SCCs.
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_psPs(True, :(False, vz41), vz5) → new_psPs(True, vz41, vz5)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_psPs(True, :(False, vz41), vz5) → new_psPs(True, vz41, vz5)
The graph contains the following edges 1 >= 1, 2 > 2, 3 >= 3
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_psPs(False, :(True, vz41), vz5) → new_psPs(False, vz41, vz5)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_psPs(False, :(True, vz41), vz5) → new_psPs(False, vz41, vz5)
The graph contains the following edges 1 >= 1, 2 > 2, 3 >= 3
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
Q DP problem:
The TRS P consists of the following rules:
new_foldr(vz4, :(vz30, vz31)) → new_foldr(vz4, vz31)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_foldr(vz4, :(vz30, vz31)) → new_foldr(vz4, vz31)
The graph contains the following edges 1 >= 1, 2 > 2